/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * 物料类型Entity
 * @author HOHD
 * @version 2020-12-14
 */
@Table(name="st_material_type", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="type_name", attrName="typeName", label="类型名称"),
		@Column(name="code", attrName="code", label="编码字符"),
		@Column(name="sort_number", attrName="sortNumber", label="排序号"),
		@Column(name="parent_id", attrName="parentId", label="父id"),
		@Column(name="belong", attrName="belong", label="归属"),
		@Column(name="fixed_cost", attrName="fixedCost", label="固定成本"),
		@Column(name="cost_index", attrName="costIndex", label="成本系数"),
	}, orderBy="a.id DESC"
)
public class StMaterialType extends DataEntity<StMaterialType> {
	
	private static final long serialVersionUID = 1L;
	private String typeName;		// 类型名称
	private String code;		// 编码字符
	private Integer sortNumber;		// 排序号
	private String parentId;		// 父id
	private Integer belong;		// 归属
	private BigDecimal fixedCost;		// 固定成本
	private BigDecimal costIndex;		// 成本系数
	
	public StMaterialType() {
		this(null);
	}

	public StMaterialType(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="类型名称长度不能超过 20 个字符")
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	
	@Length(min=0, max=20, message="编码字符长度不能超过 20 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public Integer getSortNumber() {
		return sortNumber;
	}

	public void setSortNumber(Integer sortNumber) {
		this.sortNumber = sortNumber;
	}
	
	@Length(min=0, max=36, message="父id长度不能超过 36 个字符")
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	
	public Integer getBelong() {
		return belong;
	}

	public void setBelong(Integer belong) {
		this.belong = belong;
	}
	
	public BigDecimal getFixedCost() {
		return fixedCost;
	}

	public void setFixedCost(BigDecimal fixedCost) {
		this.fixedCost = fixedCost;
	}
	
	public BigDecimal getCostIndex() {
		return costIndex;
	}

	public void setCostIndex(BigDecimal costIndex) {
		this.costIndex = costIndex;
	}
	
}